<?php

namespace app\model\sdk;

use app\model\ModelBase;

class Orders extends ModelBase
{
    /**
     * 数据表名
     * @var string
     */
    protected $table = 'orders';

    // 订单状态
    const PAY_STATUS_CREATE       = 0; // 创建订单
    const PAY_STATUS_PAY_OK       = 1; // 支付成功
    const PAY_STATUS_CALLBACK_OK  = 2; // 发货成功
    const PAY_STATUS_CALLBACK_ERR = 3; // 发货失败
    const PAY_STATUS_RUNING       = 11; // 支付进行中
    const PAY_STATUS_ERROR        = 12; // 支付金额异常
    const PAY_STATUS_XUNI         = 201; // 虚拟订单

    // 支付类型
    const PAY_PLATFORM_CHANNEL          = 0;   //渠道支付
    const PAY_PLATFORM_ALIPAY_H5        = 11;   //支付宝-H5
    const PAY_PLATFORM_ALIPAY_QR        = 12;   //支付宝-二维码
    const PAY_PLATFORM_WECHAT_H5        = 21;   //微信-H5
    const PAY_PLATFORM_WECHAT_JSSDK     = 22;   //微信-公众号支付
    const PAY_PLATFORM_WECHAT_NAVTIVE   = 23;   //微信-扫码支付
    const PAY_PLATFORM_WECHAT_MIDAS     = 24;   //微信支付-米大师
    const PAY_PLATFORM_EPAY             = 31;   //易宝支付-银联
    const PAY_PLATFORM_IAP              = 41;   //苹果内购
    const PAY_PLATFORM_POINT            = 51;   //平台币
    const PAY_PLATFORM_GOOGLE           = 61;   //google内购
    const PAY_PLATFORM_PAYSSION_H5      = 71;   //payssion-H5
    const PAY_PLATFORM_COIN             = 81;   //平台币支付
    const PAY_PLATFORM_OPPO             = 91;   //OPPO支付
    const PAY_PLATFORM_NL_CHECKOUT      = 101;  //越南第三方NL-Checkout支付
    const PAY_PLATFORM_NL_CARD          = 111;  //越南第三方NL-Card支付
    const PAY_PLATFORM_BANK             = 121;  //线下银行卡转账
    const PAY_PLATFORM_ONE_STORE        = 131;  //OneStore
    const PAY_PLATFORM_YIBAO_WECHAT_H5  = 141;  //易宝微信H5
    const PAY_PLATFORM_WAN_WECHAT_JSSDK = 151;  //8827wan-微信-公众号支付

    /**
     * 商品类型
     */
    const GOODS_TYPE_NORMAL = 1; // 普通商品
    const GOODS_TYPE_DAIJINJUAN = 2; // 代金券
    const GOODS_TYPE_XUNI = 3; // 虚拟商品
}
